﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="WorkFlow_WFProcess_EspecialSendSelect" Codebehind="EspecialSendSelect.aspx.cs" %>

<%@ Register Src="FlowPaint.ascx" TagName="FlowPaint" TagPrefix="uc3" %>

<%@ Register Src="../Control/WFTitle.ascx" TagName="WFTitle" TagPrefix="uc1" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html  xmlns:v="urn:schemas-microsoft-com:vml" >
<head id="Head1" runat="server">
<title>选择特送环节</title>
 <base target="_parent" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache"/>
<meta http-equiv="Expires" content="0"/>   
<script language="javascript" type="text/javascript" src="js/Win.js"></script>
<link href="../css/showDiv/opendiv.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="../css/showDiv/opendiv.js"></script>
<script language="javascript" type="text/javascript" src="../../Scripts/jquery-1.4.1.js"></script>
<style type="text/css">
v\:* { Behavior: url(#default#VML) }
</style>  
 <style type="text/css">
        body
        {
            font-size:12px;
        }
        </style>
        <link href="../Styles/control.css" rel="stylesheet" type="text/css" />
</head>

<body oncontextmenu="return false;" scroll="auto">
    <div align="center" style="vertical-align:top;">
        <table width="96%" cellpadding="0" cellspacing="0">
            <tr height="40px">
                <td style="width: 100%">
                    <uc1:WFTitle ID="WFTitle1" runat="server" />
                </td>
            </tr>
            <tr height="400px" valign="top" align="left">
                <td style="width: 100%" valign="top">
                    <uc3:FlowPaint ID="FlowPaint1" runat="server" />
                </td>
            </tr>
            <tr height="25px">
                <td style="width: 100%" align="right">
                    <table width="100%">
                        <tr>
                            <td align="left"></td>
                            <td>
                                <input type="button"  id="btnNext"   class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'"  value="确  定" onclick="DoNext();" class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'" />
                                <input type="button"  id="btnCancel" class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'"  value="取  消"  onclick="window.close();" class="btn_normal" onmouseover="this.className='btn_active'" onmouseout="this.className='btn_normal'" />
                                &nbsp;&nbsp;&nbsp;&nbsp;
                            </td>
                         </tr>
                     </table>                    
                </td>
            </tr>
        </table>
        <input type="hidden" id="HidSelectNodeID" runat="server" />
        <input type="hidden" id="HidCanSelectNodeID" runat="server" />
    </div> 
   <script language="javascript" type="text/javascript">
    function DoNext()
    {
        if(SelectNodeID == "")
        {
            alert("请选择特送的目标活动环节！只能是人工活动环节！");
            return;
        }
        SelectNodeID = SelectNodeID.substring(10);
        var canSelectNode = document.getElementById("<%=HidCanSelectNodeID.ClientID %>").value;
        var canNext = false;
        if (canSelectNode != "") {
            var nodes = canSelectNode.split(',');
            for (var i = 0; i < nodes.length; i++) {
                if (nodes[i] == SelectNodeID) {
                    canNext = true;
                    break;
                }
            }
        }
        else {
            canNext = true;
        }
        if (!canNext) {
            alert("流程配置了本环节处理不能特送到选定的环节，请重新选择！");
            return;
        }
        window.returnValue = SelectNodeID;
        window.close();
    }
    </script> 
    <script language="javascript" type="text/javascript">
    if(window.returnValue == null)
    {
        window.returnValue="";
    }
    </script>
</body>
</html>
